An Experiment with the Fourth Futamura Projection
نویسنده
چکیده
We have experimentally validated the theoretical insight, that a compiler generator is a generating extension of a program specializer, by showing that an existing offline partial evaluator can perform the fourth Futamura projection. Specifically, an online and an offline partial evalua-tor for an imperative flowchart language were transformed into two new compiler generators by Romanenko's classical partial evaluator Unmix. The two partial evaluators are described, as is a novel recursive method for polyvariant specialization. These results strongly indicate that existing partial evaluation techniques can be put to work on several new applications.
منابع مشابه
Topics in Semantics-based Program Manipulation
Programming is at least as much about manipulating existing code as it is about writing new code. Existing code is modified, for example to make inefficient code run faster, or to accommodate for new features when reusing code; existing code is analyzed, for example to verify certain program properties, or to use the analysis information for code modifications. Semantics-based program manipulat...
متن کاملRevisiting the Futamura Projections: A Visual Tutorial
The advent of language implementation tools such as PyPy have broadened interest in topics related to automatic compiler generation and optimization. Given this broader interest, we revisit the Futamura Projections using a diagram scheme. Through these diagrams we emphasize the recurring patterns in the Futamura Projections while addressing their complexity and abstract nature. We anticipate th...
متن کاملA Self - Applicable Partial Evaluator for the Logic Programming Language
Partial evaluation is a program specialisation technique that has been shown to have great potential in logic programming, particularly for the specialisation of meta-interpreters by the so-called " Futamura Projections ". Meta-interpreters and other meta-programs are programs which use another program as data. The Futamura projections also show that partial evaluator which is self-applicable (...
متن کاملA Symmetric Approach to Compilation and Decompilation
Just as an interpreter for a source language can be turned into a compiler from the source language to a target language, we observe that an interpreter for a target language can be turned into a compiler from the target language to a source language. In both cases, the key issue is the choice of whether to perform an evaluation or to emit code that represents this evaluation. We substantiate t...
متن کاملA fourth-order auxiliary variable projection method for zero-Mach number gas dynamics
A fourth-order numerical method for the zero-Mach-number limit of the equations for compressible flow is presented. The method is formed by discretizing a new auxiliary variable formulation of the conservation equations, which is a variable density analog to the impulse or gauge formulation of the incompressible Euler equations. An auxiliary variable projection method is applied to this formula...
متن کامل